// api/main.ts
import request from "../service/request";

export function getAllArea(data: any) {
  return request({
    url: "v1/common/get_all_area",
    method: "post",
    data,
  });
}

export function newsSignUp(data: any) {
  return request({
    url: "v1/news/sign_up",
    method: "post",
    data,
  });
}

export function newsDetail(data: any) {
  return request({
    url: "v1/news/detail",
    method: "post",
    data,
  });
}

export function companyQueryName(data: any) {
  return request({
    url: "v1/common/company_query_name",
    method: "post",
    data,
  });
}

export function squareUserList(data: any) {
  return request({
    url: "v1/square_user/list",
    method: "post",
    data,
  });
}

export function squareUserDetail(data: any) {
  return request({
    url: "v1/square_user/detail",
    method: "post",
    data,
  });
}

export function squareCompanyDetail(data: any) {
  return request({
    url: "v1/square_company/detail",
    method: "post",
    data,
  });
}

export function squareCompany(data: any) {
  return request({
    url: "v1/square_company/list",
    method: "post",
    data,
  });
}

export function demandDetail(data: any) {
  return request({
    url: "v1/demand/detail",
    method: "post",
    data,
  });
}

export function demandAdd(data: any) {
  return request({
    url: "v1/demand/add",
    method: "post",
    data,
  });
}

export function demandEdit(data: any) {
  return request({
    url: "v1/demand/edit",
    method: "post",
    data,
  });
}

export function homeNews(data: any) {
  return request({
    url: "v1/home/news",
    method: "post",
    data,
  });
}

export function getBanner(data: any) {
  return request({
    url: "v1/home/banner",
    method: "post",
    data,
  });
}

export function getSmsCode(data: any) {
  return request({
    url: "v1/send_code",
    method: "post",
    data,
  });
}

export function loginByWXOC(data: any) {
  return request({
    url: "v1/get_token",
    method: "post",
    data,
  });
}

export function upload(data: any) {
  return request({
    url: "v1/common/upload",
    method: "post",
    data,
  });
}

export function getDemandType(data: any) {
  return request({
    url: "v1/common/get_type",
    method: "post",
    data,
  });
}

export function demandList(data: any) {
  return request({
    url: "v1/demand/list",
    method: "post",
    data,
  });
}

export function userlogin(data: any) {
  return request({
    url: "v1/user/login",
    method: "post",
    data,
  });
}

export function addUser(data: any) {
  return request({
    url: "/user/add",
    method: "post",
    data,
  });
}

export function replyUserList(data: any) {
  return request({
    url: "v1/demand/reply_user_list",
    method: "post",
    data,
  });
}

export function userInfo() {
  return request({
    url: "v1/user/info",
    method: "post",
  });
}

export function replyList(data: any) {
  return request({
    url: "v1/demand/reply_list",
    method: "post",
    data,
  });
}

export function demandDocking(data: any) {
  return request({
    url: "v1/demand/docking",
    method: "post",
    data,
  });
}

export function reply(data: any) {
  return request({
    url: "v1/demand/reply",
    method: "post",
    data,
  });
}

export function demandEnd(data: any) {
  return request({
    url: "v1/demand/end",
    method: "post",
    data,
  });
}

export function activityList(data: any) {
  return request({
    url: "v1/activity/list",
    method: "post",
    data,
  });
}

export function activityDetail(data: any) {
  return request({
    url: "v1/activity/detail",
    method: "post",
    data,
  });
}

export function courseList(data: any) {
  return request({
    url: "v1/course/list",
    method: "post",
    data,
  });
}

export function courseDetail(data: any) {
  return request({
    url: "v1/course/detail",
    method: "post",
    data,
  });
}

export function companyInfo() {
  return request({
    url: "v1/company/info",
    method: "post",
  });
}

export function personnelList(data: any) {
  return request({
    url: "v1/personnel/list",
    method: "post",
    data,
  });
}

export function personnelAdd(data: any) {
  return request({
    url: "v1/personnel/add",
    method: "post",
    data,
  });
}

export function personnelCards() {
  return request({
    url: "v1/personnel/get_cards",
    method: "post",
  });
}

export function personnelEducations() {
  return request({
    url: "v1/personnel/get_educations",
    method: "post",
  });
}

export function personnelInfo(data: any) {
  return request({
    url: "v1/personnel/info",
    method: "post",
    data,
  });
}

export function personnelEdit(data: any) {
  return request({
    url: "v1/personnel/edit",
    method: "post",
    data,
  });
}

export function personnelDel(data: any) {
  return request({
    url: "v1/personnel/del",
    method: "post",
    data,
  });
}

export function companylEdit(data: any) {
  return request({
    url: "v1/company/edit",
    method: "post",
    data,
  });
}

export function checkApply() {
  return request({
    url: "v1/company/check_apply",
    method: "post",
  });
}

export function companyApply(data: any) {
  return request({
    url: "v1/company/apply",
    method: "post",
    data,
  });
}

export function getCompanyLevel(data: any) {
  return request({
    url: "v1/common/get_company_level",
    method: "post",
    data,
  });
}

export function getCompanyEconomic() {
  return request({
    url: "v1/common/get_company_economic",
    method: "post",
  });
}

export function courseGetFile(data: any) {
  return request({
    url: "v1/course/get_file",
    method: "post",
    data,
  });
}

export function courseShowUrl(data: any) {
  return request({
    url: "v1/course/show_url",
    method: "post",
    data,
  });
}

export function courseSignUp(data: any) {
  return request({
    url: "v1/course/sign_up",
    method: "post",
    data,
  });
}

export function getCharge(data: any) {
  return request({
    url: "v1/course/get_charge",
    method: "post",
    data,
  });
}

export function userShare(data: any) {
  return request({
    url: "v1/user/share",
    method: "get",
    params: data,
  });
}

export function newsShare(data: any) {
  return request({
    url: "v1/news/share",
    method: "get",
    params: data,
  });
}

export function deamndShare(data: any) {
  return request({
    url: "v1/demand/share",
    method: "get",
    params: data,
  });
}

export function squareUser(data: any) {
  return request({
    url: "v1/square_user/share",
    method: "get",
    params: data,
  });
}

export function companyShare(data: any) {
  return request({
    url: "v1/square_company/share",
    method: "get",
    params: data,
  });
}

export function courseShare(data: any) {
  return request({
    url: "v1/find_course/share",
    method: "get",
    params: data,
  });
}

export function activityShare(data: any) {
  return request({
    url: "v1/find_activity/share",
    method: "get",
    params: data,
  });
}

export function exchange(data: any) {
  return request({
    url: "v1/square_user/exchange",
    method: "POST",
    data,
  });
}

export function reasonList(data: any) {
  return request({
    url: "v1/demand/reason_list",
    method: "POST",
    data,
  });
}

export function complaint(data: any) {
  return request({
    url: "v1/demand/complaint",
    method: "POST",
    data,
  });
}

export function getUserIntegral() {
  return request({
    url: "v1/common/get_user_integral",
    method: "POST",
  });
}

export function getmydemand(data: any) {
  return request({
    url: "v1/user/get_my_demand",
    method: "POST",
    data,
  });
}

export function getmycourse(data: any) {
  return request({
    url: "v1/user/get_my_course",
    method: "POST",
    data,
  });
}

export function getexchangehandle(data: any) {
  return request({
    url: "v1/user_card/get_my_friend",
    method: "POST",
    data,
  });
}

export function getexchangeing(data: any) {
  return request({
    url: "v1/user_card/get_exchange_ing",
    method: "POST",
    data,
  });
}

export function getexchangehandles() {
  return request({
    url: "v1/user_card/get_exchange_handle",
    method: "POST",
  });
}

export function userCardAdop(data: any) {
  return request({
    url: "v1/user_card/adopt",
    method: "POST",
    data,
  });
}

export function userCardRefuse(data: any) {
  return request({
    url: "v1/user_card/refuse",
    method: "POST",
    data,
  });
}

export function orderInfo(data: any) {
  return request({
    url: "v1/order/info",
    method: "POST",
    data,
  });
}

export function orderList(data: any) {
  return request({
    url: "v1/order/list",
    method: "POST",
    data,
  });
}

export function orderCreate(data: any) {
  return request({
    url: "v1/order/create",
    method: "POST",
    data,
  });
}

export function orderGetCharge(data: any) {
  return request({
    url: "v1/order/get_charge",
    method: "POST",
    data,
  });
}

export function orderCancel(data: any) {
  return request({
    url: "v1/order/cancel",
    method: "POST",
    data,
  });
}

export function getMyActivity(data: any) {
  return request({
    url: "v1/user/get_my_activity",
    method: "POST",
    data,
  });
}

export function integralList(data: any) {
  return request({
    url: "v1/integral/list",
    method: "POST",
    data,
  });
}

export function publishList(data: any) {
  return request({
    url: "v1/publish/list",
    method: "POST",
    data,
  });
}

export function publishInvoicingt(data: any) {
  return request({
    url: "v1/publish/invoicing",
    method: "POST",
    data,
  });
}

export function publishInfo(data: any) {
  return request({
    url: "v1/publish/info",
    method: "POST",
    data,
  });
}

export function chooseSignNum(data: any) {
  return request({
    url: "v1/activity/choose_sign_num",
    method: "POST",
    data,
  });
}

export function addActivity(data: any) {
  return request({
    url: "v1/activity/add_user",
    method: "POST",
    data,
  });
}

export function orderReply(data: any) {
  return request({
    url: "v1/order/reply",
    method: "POST",
    data,
  });
}

export function chooseIntegral(data: any) {
  return request({
    url: "v1/order/choose_integral",
    method: "POST",
    data,
  });
}

export function getLastApply(data: any) {
  return request({
    url: "v1/company/get_last_apply",
    method: "POST",
    data,
  });
}

export function logout() {
  return request({
    url: "/v1/user/logout",
    method: "POST",
  });
}

export function activityUserList(data: any) {
  return request({
    url: "v1/activity/user_list",
    method: "POST",
    data,
  });
}

export function wechatJsapi(data: any) {
  return request({
    url: "v1/wechat/jsapi",
    method: "POST",
    data,
  });
}

export function getAssociations() {
  return request({
    url: "/v1/common/association",
    method: "get",
  });
}

export function getMyCardInfo(data: any) {
  return request({
    url: "v1/user_card/get_my_card_info",
    method: "POST",
    data,
  });
}

export function getConstantlyInfo(data: any) {
  return request({
    url: "v1/get_user_info_constantly",
    method: "POST",
    data,
  });
}

export function getWechatQrcode() {
  return request({
    url: "v1/getWechatQrcode",
    method: "get",
  });
}

export function getQueryCardInfo(data: any) {
  return request({
    url: "v1/user_card/getNameAndCardQueryCardInfo",
    method: "POST",
    data,
  });
}

export function getActivityQrcode(data: any) {
  return request({
    url: "v1/activity/getQRCode",
    method: "POST",
    data,
  });
}

// 开票跳转
export function invoiceGetAuthUrl(data: any) {
  return request({
    url: "v1/wx_invoice/invoiceGetAuthUrl",
    method: "POST",
    data,
  });
}

// 活动输入增加
export function writecontent(data: any) {
  return request({
    url: "v2/writecontent",
    method: "POST",
    data,
  });
}

// 开票类型
export function getInvoiceType() {
  return request({
    url: "v1/publish/getInvoiceType",
    method: "POST",
  });
}

// 活动签到
export function userSignIn(data: any) {
  return request({
    url: "v1/activity/userSignIn",
    method: "POST",
    data,
  });
}

// 获取当前用户所属企业信息
export function getUserNowCompanyInfo() {
  return request({
    url: "v1/getUserNowCompanyInfo",
    method: "get",
  });
}

// 获取活动分类列表
export function getActivityCategory() {
  return request({
    url: "v1/getActivityCategory",
    method: "POST",
  });
}
// 生成活动回执
export function createActivityReceipt(data: any) {
  return request({
    url: "v1/createActivityReceipt",
    method: "POST",
    data,
  });
}

// 取消订单
export function cancelSignLog(data: any) {
  return request({
    url: "v1/cancelSignLog",
    method: "POST",
    data,
  });
}

// 检测订单状态
export function checkOrderStatus(data: any) {
  return request({
    url: "v1/checkOrderStatus",
    method: "POST",
    data,
  });
}

// 获取取消报名联系退款电话
export function getCancelSignLinkManMobile(data: any) {
  return request({
    url: "v1/getCancelSignLinkManMobile",
    method: "POST",
    data,
  });
}

// 获取应用的jsapi_ticket
export function getJsapiTicket(data: any) {
  return request({
    url: `/v3/getJsapiTicket?url=${data.url}`,
    method: "GET",
  });
}

// 获取微信小程序配置
export function getWxConfig(data: any) {
  return request({
    url: `v3/getWxConfig?url=${data.url}`,
    method: "GET",
  });
}

// 获取问卷调查列表
export function getMyQuestionnaireList() {
  return request({
    url: "v1/questionnaire/getMyQuestionnaireList",
    method: "POST"
  });
}

// 获取问卷信息
export function getNewQuestionnaire() {
  return request({
    url: "v1/questionnaire/getNewQuestionnaire",
    method: "POST",
  });
}

// 提交问卷
export function createMyQuestionnaire(data: any) {
  return request({
    url: "v1/questionnaire/createMyQuestionnaire",
    method: "POST",
    data,
  });
}

// 查看问卷详情
export function getMyQuestionnaireDetail(data: any) {
  return request({
    url: "v1/questionnaire/getMyQuestionnaireDetail",
    method: "POST",
    data,
  });
}

// 模糊搜索公司（new）
export function getCompanyNameNew(data: any) {
  return request({
    url: "v1/common/company_query_company_name",
    method: "POST",
    data,
  })
}